package leecode

func scoreOfString(s string) int {
	var result int
	for i := 0; i+1 < len(s); i++ {
		temp := int(s[i+1]) - int(s[i])
		if temp < 0 {
			temp = -temp
		}
		result += temp
	}
	return result
}
